home *** CD-ROM | disk | FTP | other *** search
/ Game Cracker (Expanded Edition) / Game Cracker (Expanded Edition).iso / cracks / RC_KHG.ZIP / klingon.txt < prev    next >
Text File  |  1998-12-10  |  14KB  |  276 lines

  1.  
  2. >>best viewed in 1024*768 with your favourite text editor<<
  3.  
  4.  
  5. Free Information Xchange presents:
  6.  
  7. Klingon Honor Guard v1.0 - CD crack by R!SC - 0A/0C/62 (10th Dec 98 !)
  8.  
  9. REQUIREMENTS:
  10. Hex editor
  11. W32Dasm
  12.  
  13.  
  14.    Lets get started then. Well, the game came on 2 CD's, I didn't like the look of that, 1.2gb of
  15. data? I checked the first CD, 140mb install file, 140mb video. I checked the second CD, 353mb of
  16. videos! Well, things are looking nicer know. We don't really need to worry about the game needing
  17. data off the CD's once it is installed, so lets Kill that nasty CD check.
  18.  
  19.  Install the game, take out the CD and load KHG(you know what I mean). Doesn't ask for a CD.
  20. Select 'NEW' game, 'Single Player' ;), 'Insert the KHG CD into the CD-ROM'. Thats the message we
  21. want. Its not a Windows message box, so this one might be tricky. I don't see any point in searching
  22. for that message under the String Data References, so we will check the Function imports for 
  23. 'GetDriveTypeA' ((nearly) always used in CD Protection). Hmm, uses the 'Unreal' engine, we know
  24. in unreal the CD protection was in 'Window.dll', I loaded this into Wdasm, look under imports for 
  25. 'GetDriveTypeA', nothing there, in a patch for Unreal, they moved the protection into 'Unreal.exe'
  26. so I checked 'Klingons.exe', nothing there either, well I checked a few more Dll's, and found a
  27. call to 'GetDriveTypeA' in 'windrv.dll'. BOOM! Make a copy of 'windrv.dll', load the copy into
  28. W32dasm, click on functions/imports, scroll down until you get to KERNEL32.GetDriveTypeA, double
  29. click on this, and again, and again, if you payed attention, two refs to this function, the first
  30. one is ours. The second one is the jump to the windows routine in memory. I don't know how to explain
  31. it, except like this:- CALL=good (our actual code) JMP=bad (windows kernel code) OK?
  32.  
  33. * Possible StringData Ref from Data Obj ->"CdPath"               <-- Interesting?
  34.                                   |
  35. :10A0533C 68001BA110              push 10A11B00
  36.  
  37. * Possible StringData Ref from Data Obj ->"Engine.Engine"
  38.                                   |
  39. :10A05341 68401CA110              push 10A11C40
  40. :10A05346 AA                      stosb
  41.  
  42. * Reference To: Core.?GetConfigString@@YAHPBD0PADH0@Z, Ord:01B1h
  43.                                   |
  44. :10A05347 FF15D048A110            Call dword ptr [10A148D0]
  45.  
  46. * Possible StringData Ref from Data Obj ->"C:\"                  <-- common string in CD protection routines
  47.                                   |
  48. :10A0534D BFFC1AA110              mov edi, 10A11AFC
  49. :10A05352 83C9FF                  or ecx, FFFFFFFF
  50. :10A05355 33C0                    xor eax, eax
  51. :10A05357 83C414                  add esp, 00000014
  52. :10A0535A F2                      repnz
  53. :10A0535B AE                      scasb
  54. :10A0535C F7D1                    not ecx
  55. :10A0535E 2BF9                    sub edi, ecx
  56. :10A05360 8D542410                lea edx, dword ptr [esp+10]
  57. :10A05364 8BC1                    mov eax, ecx
  58. :10A05366 8BF7                    mov esi, edi
  59. :10A05368 8BFA                    mov edi, edx
  60. :10A0536A C1E902                  shr ecx, 02
  61. :10A0536D F3                      repz
  62. :10A0536E A5                      movsd
  63. :10A0536F 8BC8                    mov ecx, eax
  64. :10A05371 8D442410                lea eax, dword ptr [esp+10]
  65. :10A05375 83E103                  and ecx, 00000003
  66. :10A05378 50                      push eax
  67. :10A05379 F3                      repz
  68. :10A0537A A4                      movsb
  69. :10A0537B 8B8D0C010000            mov ecx, dword ptr [ebp+0000010C]
  70. :10A05381 8A9160040000            mov dl, byte ptr [ecx+00000460]
  71. :10A05387 88542414                mov byte ptr [esp+14], dl
  72.  
  73. * Reference To: KERNEL32.GetDriveTypeA, Ord:00DFh                <-- Call that got us here.
  74.                                   |
  75. :10A0538B FF15C04AA110            Call dword ptr [10A14AC0]
  76. :10A05391 83F805                  cmp eax, 00000005              <-- 05=CD-ROM
  77. :10A05394 7435                    je 10A053CB                    <-- If it finds a CD-ROM, it jumps
  78.                                                                  <-- to 10A053CB, we want this to happen!
  79.                                                                  <-- so we change this to a JMP (EB35)
  80. * Possible StringData Ref from Data Obj ->"mpbad"                <-- Not Good (heh!)
  81. :10A05396 68F41AA110              push 10A11AF4
  82. :10A0539B 53                      push ebx
  83.  
  84. * Reference To: Core.?Logf@FOutputDevice@@QAAXPBDZZ, Ord:024Dh
  85.                                   |
  86. :10A0539C FF15A448A110            Call dword ptr [10A148A4]      <-- this bit sez screw you, you ain't got no CD
  87.  
  88. * Reference To: Core.?GSystem@@3PAVFGlobalPlatform@@A, Ord:01A3h
  89.                                   |
  90. :10A053A2 8B0D7848A110            mov ecx, dword ptr [10A14878]
  91. :10A053A8 83C408                  add esp, 00000008
  92. :10A053AB 8B11                    mov edx, dword ptr [ecx]
  93.  
  94. * Possible StringData Ref from Data Obj ->"CDK = DriveRoot"
  95.                                   |
  96. :10A053AD 68E01AA110              push 10A11AE0
  97. :10A053B2 68FA020000              push 000002FA
  98. :10A053B7 52                      push edx
  99.  
  100. * Reference To: Core.?Logf@FOutputDevice@@QAAXW4EName@@PBDZZ, Ord:024Eh
  101.                                   |
  102. :10A053B8 FF159048A110            Call dword ptr [10A14890]
  103. :10A053BE 83C40C                  add esp, 0000000C
  104. :10A053C1 B801000000              mov eax, 00000001              <-- Say we failed CD-Check by putting
  105. :10A053C6 E997030000              jmp 10A05762                   <-- a 1 in eax and jumping to exit call
  106.  
  107.  Well, this is quite good, checks for a CD-ROM, if it finds one it jumps to 10A053CB, if not, it
  108. puts a '1' in EAX, then asks you for the CD? OK. Take the conditional jump after cmp eax,00000005
  109. (make sure the blue bar is on it and push cursor right(or use the button at the top)) We get to
  110. the code below. Have a look at it.
  111.  
  112. * Referenced by a (U)nconditional or (C)onditional Jump at Address:
  113. |:10A05394(C)
  114. |
  115. :10A053CB 8B850C010000            mov eax, dword ptr [ebp+0000010C]  <-- jump that said we had a
  116.                                                                      <-- CD brought us here 
  117. * Reference To: Core.?appSprintf@@YAHPADPBDZZ, Ord:033Dh
  118.                                   |
  119. :10A053D1 8B358848A110            mov esi, dword ptr [10A14888]
  120. :10A053D7 0560040000              add eax, 00000460
  121. :10A053DC 8D4C241C                lea ecx, dword ptr [esp+1C]
  122. :10A053E0 50                      push eax
  123.  
  124. * Possible StringData Ref from Data Obj ->"%snotcd.txt"              <-- well, nice of them wasn't it?
  125.                                   |
  126. :10A053E1 68D01AA110              push 10A11AD0
  127. :10A053E6 51                      push ecx
  128. :10A053E7 FFD6                    call esi
  129. :10A053E9 83C40C                  add esp, 0000000C
  130. :10A053EC 8D54241C                lea edx, dword ptr [esp+1C]
  131. :10A053F0 6A00                    push 00000000
  132. :10A053F2 6880000000              push 00000080
  133. :10A053F7 6A02                    push 00000002
  134. :10A053F9 6A00                    push 00000000
  135. :10A053FB 6A01                    push 00000001
  136. :10A053FD 6800000040              push 40000000
  137. :10A05402 52                      push edx
  138.  
  139. * Reference To: KERNEL32.CreateFileA, Ord:0031h                  <-- Try to Create a File on the
  140.                                                                  <-- Drive that GetDriveTypeA returned                                  |
  141. :10A05403 FF15C44AA110            Call dword ptr [10A14AC4]
  142. :10A05409 83F8FF                  cmp eax, FFFFFFFF              <-- FFFFFFFF(-1)=failed
  143. :10A0540C 7434                    je 10A05442                    <-- CD-ROMS are READ ONLY so if we
  144.                                                                  <-- couldn't write to it, it must be
  145.                                                                  <-- a CD-ROM (change this to a JMP)
  146.                                                                  <-- (EB34) 
  147. * Possible StringData Ref from Data Obj ->"mpbad"
  148.                                   |
  149. :10A0540E 68F41AA110              push 10A11AF4
  150. :10A05413 53                      push ebx
  151.  
  152. * Reference To: Core.?Logf@FOutputDevice@@QAAXPBDZZ, Ord:024Dh
  153.                                   |
  154. :10A05414 FF15A448A110            Call dword ptr [10A148A4]
  155. :10A0541A A17848A110              mov eax, dword ptr [10A14878]
  156. :10A0541F 83C408                  add esp, 00000008
  157. :10A05422 8B08                    mov ecx, dword ptr [eax]
  158.  
  159. * Possible StringData Ref from Data Obj ->"CDK = CanWrite"       <-- we don't want this?
  160.                                   |
  161. :10A05424 68BC1AA110              push 10A11ABC
  162. :10A05429 68FA020000              push 000002FA
  163. :10A0542E 51                      push ecx
  164.  
  165. * Reference To: Core.?Logf@FOutputDevice@@QAAXW4EName@@PBDZZ, Ord:024Eh
  166.                                   |
  167. :10A0542F FF159048A110            Call dword ptr [10A14890]
  168. :10A05435 83C40C                  add esp, 0000000C
  169. :10A05438 B801000000              mov eax, 00000001             <-- Say we failed CD-Check by putting
  170. :10A0543D E920030000              jmp 10A05762                  <-- a 1 in eax and jumping to exit call
  171.  
  172. * Referenced by a (U)nconditional or (C)onditional Jump at Address:
  173. |:10A0540C(C)
  174. |
  175. :10A05442 8D54241C                lea edx, dword ptr [esp+1C]   <-- we get here if we couldn't 'CreateFileA'
  176. :10A05446 689432A110              push 10A13294
  177. :10A0544B 52                      push edx
  178. :10A0544C FFD6                    call esi
  179. :10A0544E 8B850C010000            mov eax, dword ptr [ebp+0000010C]
  180. :10A05454 83C408                  add esp, 00000008
  181. :10A05457 0560040000              add eax, 00000460
  182. :10A0545C 8D4C241C                lea ecx, dword ptr [esp+1C]
  183. :10A05460 50                      push eax
  184.  
  185. * Possible StringData Ref from Data Obj ->"%sbuildup.avi"       <-- one of the files on CD 2
  186.                                   |
  187. :10A05461 68AC1AA110              push 10A11AAC
  188. :10A05466 51                      push ecx
  189. :10A05467 FFD6                    call esi
  190.  
  191. * Reference To: Core.?appFSize@@YAHPBD@Z, Ord:0311h             <-- check the size??
  192.                                   |
  193. :10A05469 8B3DCC48A110            mov edi, dword ptr [10A148CC]
  194. :10A0546F 83C40C                  add esp, 0000000C
  195. :10A05472 8D54241C                lea edx, dword ptr [esp+1C]
  196. :10A05476 52                      push edx
  197. :10A05477 FFD7                    call edi
  198. :10A05479 83C404                  add esp, 00000004
  199. :10A0547C 85C0                    test eax, eax
  200. :10A0547E 0F8F97000000            jg 10A0551B                   <-- if that passed, jump to 10A0551B
  201. :10A05484 A17848A110              mov eax, dword ptr [10A14878]
  202.  
  203. * Reference To: Core.?Logf@FOutputDevice@@QAAXW4EName@@PBDZZ, Ord:024Eh
  204.                                   |
  205. :10A05489 8B2D9048A110            mov ebp, dword ptr [10A14890]
  206.                                                                 <-- otherwise do this bit...
  207. * Possible StringData Ref from Data Obj ->"CDK = GPFNF"         <-- GPFNF=general protection fault xx
  208. |                                                               <-- (probably) not what we want...
  209. :10A0548F 689C1AA110              push 10A11A9C
  210. :10A05494 68FA020000              push 000002FA
  211. :10A05499 8B08                    mov ecx, dword ptr [eax]
  212. :10A0549B 51                      push ecx
  213. :10A0549C FFD5                    call ebp
  214. :10A0549E 83C40C                  add esp, 0000000C
  215. :10A054A1 8D54241C                lea edx, dword ptr [esp+1C]
  216. :10A054A5 689432A110              push 10A13294
  217. :10A054AA 52                      push edx
  218. :10A054AB FFD6                    call esi
  219. :10A054AD 83C408                  add esp, 00000008
  220. :10A054B0 8D442410                lea eax, dword ptr [esp+10]
  221. :10A054B4 8D4C241C                lea ecx, dword ptr [esp+1C]
  222. :10A054B8 50                      push eax
  223.  
  224. * Possible StringData Ref from Data Obj ->"%sintro.avi"
  225.                                   |
  226. :10A054B9 688C1AA110              push 10A11A8C
  227. :10A054BE 51                      push ecx
  228. :10A054BF FFD6                    call esi
  229. :10A054C1 83C40C                  add esp, 0000000C
  230. :10A054C4 8D54241C                lea edx, dword ptr [esp+1C]
  231. :10A054C8 52                      push edx
  232. :10A054C9 FFD7                    call edi
  233. :10A054CB 83C404                  add esp, 00000004
  234. :10A054CE 85C0                    test eax, eax
  235. :10A054D0 7F30                    jg 10A05502
  236.  
  237. * Possible StringData Ref from Data Obj ->"mpbad"
  238.  
  239.  Right then, the CD routine returns a '1' in eax if it failed (i.e. NO CD) otherwise, it does
  240. whatever, and returns a '0' in eax, so we can take all the jumps it makes for a good CD check, or
  241. we should be able to put a '0' in eax and jump to the exit routine. Well, I cant be bothered to
  242. find out, so, the last conditional jump we had in the CD-CHECK for good CD was the size check
  243.  
  244. :10A0547E 0F8F97000000            jg 10A0551B
  245.  
  246. Change this to a Jmp (this being a long jump=change the 0F8F97000000 to 90E997000000) A jmp is one
  247. byte smaller than a conditional jump, so we put a 90 (nop) at the start to fix this little problem. 
  248.  
  249.    Right, load 'windrv.dll' into your hex editor. Double click on the 'je 10A053CB' below the Ref to 
  250. "GetDriveTypeA" in W32dasm and at the bottom of the screen will be your offset to Hexedit the
  251. program. Mine was 00004794, back into Hex editor goto 00004794, change the 7435 (je) to a EB35 (jmp),
  252. W32Dasm again, double click 'je 10A05442' after the reference to 'CreateFileA', check the offset,
  253. back into your hex editor and change the 7434 (je) to a EB34 (jmp). W32Dasm again!, double click
  254. the 'jg 10A0551B' after the ref to 'Core.?appFSize' change the '0F8F97' to a '90E997' (jmp 10A0551B),
  255. save your file in hex editor, run the game and BOOM! you can play with no CD.
  256.  
  257.  
  258. edit windrv.dll (offsets are in hex)
  259. =======================================
  260. Search for: 74 35    at offset 4794
  261. Change to : EB --
  262.  
  263. Search for: 74 34    at offset 480C
  264. Change to : EB --
  265.  
  266. Search for: 0F 8F 97 00 00 00 at offset 487E
  267. Change to : 90 E9 -- -- -- --
  268.  
  269.  
  270.  Another tutorial comes to an end and another game has been FiX'ed!
  271.  
  272. happy cracking love R!SC -- risc@notme.com
  273.  
  274.  
  275.  
  276.